fix: updated logic to update versions with scripts for nightly#1165
fix: updated logic to update versions with scripts for nightly#1165lucaseduoli merged 17 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the nightly build pipeline to generate a PEP 440–compliant nightly version/tag based on what’s already published to PyPI, update pyproject.toml metadata for a nightly distribution, and publish artifacts from that tagged commit.
Changes:
- Introduces CI scripts to generate a new nightly tag from PyPI state and update
pyproject.tomlname/version for nightly builds. - Replaces the workflow’s
check-versionjob withcreate-nightly-tag, committing/tagging the updated metadata and pushing the nightly tag. - Updates downstream jobs to depend on the new tag-creation job and attempts to publish PyPI artifacts from the created tag.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/nightly-build.yml |
Adds create-nightly-tag and adjusts job dependencies/checkout logic for nightly tagging and publishing. |
scripts/ci/pypi_nightly_tag.py |
Generates a nightly version tag using the latest base version in pyproject.toml and the latest published openrag-nightly version on PyPI. |
scripts/ci/update_pyproject_combined.py |
Orchestrates updating both the project name and version for nightly builds. |
scripts/ci/update_pyproject_name.py |
Updates the name = "..."" field in pyproject.toml. |
scripts/ci/update_pyproject_version.py |
Updates the version = "..."" field in pyproject.toml. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Refactors the nightly release pipeline to generate a PyPI-compliant nightly version/tag and update pyproject.toml via dedicated CI scripts, then uses that tag across Docker image publishing and PyPI publishing.
Changes:
- Replaced the nightly “check-version” logic with a
create-nightly-tagjob that generates a nightly tag, updatespyproject.toml, commits, tags, and pushes the tag. - Added CI helper scripts to generate nightly tags from PyPI state and to update
pyproject.tomlname/version. - Updated runtime version detection to work with both
openragandopenrag-nightlydistributions.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/nightly-build.yml |
Introduces the new nightly tagging job and rewires downstream jobs to use the nightly tag. |
scripts/ci/pypi_nightly_tag.py |
Generates the nightly tag based on pyproject.toml + latest published nightly version. |
scripts/ci/update_pyproject_combined.py |
Orchestrates name/version updates for nightly builds. |
scripts/ci/update_pyproject_name.py |
Updates the project name in pyproject.toml. |
scripts/ci/update_pyproject_version.py |
Updates the project version in pyproject.toml. |
src/utils/version_utils.py |
Looks up version from either openrag or openrag-nightly dist metadata. |
src/tui/utils/version_check.py |
Updates TUI version discovery to support openrag-nightly. |
Comments suppressed due to low confidence (1)
.github/workflows/nightly-build.yml:109
buildcurrently checks out the default branch tip, not the commit that was tagged increate-nightly-tag. Since the workflow mutatespyproject.tomland tags that commit, building frommainrisks publishing Docker images whose contents/version don’t match the nightly tag. Update theactions/checkoutstep inbuildto checkoutref: ${{ needs.create-nightly-tag.outputs.nightly_version }}(and ensure tags are fetchable) so images are built from the tagged snapshot.
build:
needs: create-nightly-tag
strategy:
fail-fast: false
matrix:
include:
# backend
- image: backend
file: ./Dockerfile.backend
service: openrag-backend
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest
- image: backend
file: ./Dockerfile.backend
service: openrag-backend
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# frontend
- image: frontend
file: ./Dockerfile.frontend
service: openrag-frontend
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest
- image: frontend
file: ./Dockerfile.frontend
service: openrag-frontend
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# langflow
- image: langflow
file: ./Dockerfile.langflow
service: openrag-langflow
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest
- image: langflow
file: ./Dockerfile.langflow
service: openrag-langflow
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR refactors the nightly build workflow to generate and push a PEP 440-style nightly Git tag, update pyproject.toml for the nightly distribution name/version, and ensure runtime version detection works for both openrag and openrag-nightly.
Changes:
- Replaced the nightly workflow’s version job with a
create-nightly-tagjob that generates a nightly tag, updatespyproject.toml, commits, tags, and pushes. - Added CI scripts to update
pyproject.tomlname/version and to compute the next nightly version from PyPI metadata. - Updated version-detection utilities to read the installed distribution version from either
openragoropenrag-nightly.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/nightly-build.yml |
Adds tag creation + pyproject update/commit/tag flow; updates downstream jobs to use the new nightly tag output. |
scripts/ci/pypi_nightly_tag.py |
Computes the next nightly dev version based on current pyproject.toml and latest published nightly on PyPI. |
scripts/ci/update_pyproject_combined.py |
Orchestrates updating both package name and version for nightly. |
scripts/ci/update_pyproject_name.py |
Updates the [project].name line in pyproject.toml. |
scripts/ci/update_pyproject_version.py |
Updates the [project].version line in pyproject.toml. |
src/utils/version_utils.py |
Extends version lookup to support openrag-nightly distribution. |
src/tui/utils/version_check.py |
Extends TUI version lookup to support openrag-nightly distribution. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* updated logic to update versions with scripts for nightly * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * update import * remove pyproject from update version * updated update_pyproject_name * updated nightly logic * changed things for github * fix github nitpicks * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This pull request refactors the nightly build workflow to automate versioning and tagging for nightly releases, and introduces several scripts to manage the project name and version in
pyproject.toml. The workflow now generates a unique nightly tag based on published versions, updates project metadata, and pushes the tag to the repository. These changes ensure consistent and compliant nightly builds and simplify the version management process.Nightly build workflow automation
check-versionjob with a newcreate-nightly-tagjob in.github/workflows/nightly-build.yml, which checks out the code, sets up Python, installs dependencies, generates a nightly tag using a script, updatespyproject.toml, commits, tags, and pushes the nightly tag.build,manifest, andpublish-pypi) to referencecreate-nightly-taginstead ofcheck-version, ensuring correct job sequencing. [1] [2]Version and tag management
publish-pypijob with logic to fetch and checkout the correct nightly tag, ensuring builds use the tagged version.scripts/ci/pypi_nightly_tag.pyto generate a new nightly tag based on the latest published nightly version, following PEP 440 conventions.Project metadata update scripts
scripts/ci/update_pyproject_combined.pyto update both the project name and version inpyproject.tomlfor nightly builds.scripts/ci/update_pyproject_name.pyandscripts/ci/update_pyproject_version.pyto separately update the project name and version fields inpyproject.toml. [1] [2]